package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.ItemComment;
import cn.wolfcode.luowowo.article.mapper.ItemCommentMapper;
import cn.wolfcode.luowowo.article.service.IItemCommentService;
import cn.wolfcode.luowowo.common.query.QueryObject;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class ItemCommentServiceImpl implements IItemCommentService {
   @Autowired
    private ItemCommentMapper itemCommentMapper;


    public void save(ItemComment itemComment) {
        itemCommentMapper.save(itemComment);
    }

    public PageInfo query(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        return new PageInfo(itemCommentMapper.selectForList());
    }
}
